@import './config.less';
@tableFontSize: 12px;
/* -------------------------------- Flex -------------------------------- */
.xm{align-items:center;}
.xc{justify-content:center;}
.fx{display: flex;}
.fxmc{.fx;.xm;.xc;}
.fxm{.fx;.xm;}
.fxc{.fx;.xc;}
.fv{display: flex; flex-direction:column}
.ex{flex:1}
.abs_full{position: absolute;top:0;left:0;right:0;bottom:0;}
.scrollbar(@w:3px,@color:@scrollColor,@bgcolor:none,@rpx:6px){
    &::-webkit-scrollbar{width:@w; height: @w;}					// 滚动条整体部分
    &::-webkit-scrollbar-thumb{background-color: @color;outline:1px solid @color;border-radius: @w;}		// 滚动条
	&::-webkit-scrollbar-track{background-color: @bgcolor;}
}
/* -------------------------------- 滚动条设置 -------------------------------- */
.modalScrollBar, .rc-virtual-list-holder, textarea, .ant-transfer-list-content{ .scrollbar(6px); }
.rc-virtual-list-holder,.ant-transfer-list-content{padding-right:1px!important;}
/* -------------------------------- Button -------------------------------- */
.ant-btn > .anticon + span, .ant-btn > span + .anticon{margin-left:3px!important;}
.ant-btn > .ant-btn-loading-icon .anticon{padding-right:3px!important;}
/* -------------------------------- Dropdown -------------------------------- */
.ant-dropdown-menu{padding:0!important;}
.ant-dropdown{
	max-height: 90%;
	overflow-y: auto;
}
/* -------------------------------- Menu -------------------------------- */
.ant-menu>li{margin:0!important;height:36px!important;line-height:36px!important;}
/* -------------------------------- Form -------------------------------- */
.jzer-form{
	label{color:#666}
	.ant-form-item-label > label::after{ color:#999 }
	
	&.s3 .ant-form-item-label{width: 47px;}
	&.s4 .ant-form-item-label{width: 61px;}
	&.s5 .ant-form-item-label{width: 73px;}
	&.s6 .ant-form-item-label{width: 86px;}
	&.s7 .ant-form-item-label{width: 97px;}
	&.s8 .ant-form-item-label{width: 109px;}
	&.s9 .ant-form-item-label{width: 121px;}
	&.s10 .ant-form-item-label{width: 133px;}
	&.s12 .ant-form-item-label{width: 157px;}
	
	textarea.ant-input{padding:4px 8px!important;}
	input.ant-input-number-input, .ant-picker{padding:0 8px!important;}
	
	.ant-form-item-required::before{position: relative;top:-2px;margin-right:2px!important;}
	// checkbox
	.ant-checkbox, .ant-radio{position:relative;top:1px}
	// .jzer-item-checkbox{
	// 	.ant-form-item-label > label{height:0!important;line-height:0!important;}
	// 	.ant-form-item-control-input{min-height:0!important;}
	// }
	// radio
	//table
	input[disabled]{ color: #333 !important; }
}
.jzer-item-table{
	.ant-form-item-control{overflow:hidden!important;}
}
.ant-input-number-input-wrap,.ant-input-number-input{height:100%!important;}
// size
@small: 28px;
@middel: 34px;
@search: 26px;
@submit: 30px;
@pl: 8px;
.form-size(@name,@size){
	.h(){ height:@size!important; }
	.hh(){ .h;line-height:@size!important; }
	.jzer-form-@{name}{
		&.ant-form-horizontal{
			.ant-form-item-label > label{height:@size;line-height:@size;}
		}
		.ant-form-item-control-input{min-height:@size;}
		// select
		.ant-select-single{.h;
			.ant-select-selector{.h}
		}
		
		.ant-select-multiple{height:auto!important;min-height: @size;}
		
		.ant-select-selection-placeholder{line-height: @size - 2!important;}
		// dataPicker
		.ant-calendar-picker-input,.ant-picker{.h}
		// radio
		.ant-radio-button-wrapper{.h; line-height: @size - 2;}
	}
}

.ant-select{
	.ant-select-selection-overflow-item-rest{line-height:100%;}
	.ant-select-selection-item{margin-top: 0!important;margin-bottom: 0!important;}
	.ant-select-selection-placeholder{left:8px!important;}
}
.ant-select-multiple{
	.ant-select-selection-search{margin-inline-start:0!important;left:0!important; }
	.ant-select-selector{padding:0 24px 0 @pl!important;}
}

.ant-select-selector,.ant-calendar-picker-input{padding-left:@pl!important;}
.ant-select-selector,.ant-select-selection-search,.ant-select-selection-item, .ant-select-selection-search-input{height:100%!important;}
.ant-select-selection-item{display:flex;align-items: center;}
.ant-select-selection-search{left:@pl - 2!important;}

.form-size(middle, @middel);
.form-size(search, @search);
.form-size(submit, @submit);
.form-size(small, @small);
// error
.ant-form-item-explain{position: absolute;left:0; bottom:0px;}
.hideErrorText .ant-form-item-explain{display:none}
// disabled
input[disabled],textarea[disabled],
.ant-select-disabled .ant-select-selection-item,
.ant-radio-disabled.ant-radio-checked~span,
.ant-checkbox-checked.ant-checkbox-disabled~span{color:#333}
// search-form
.jzer-search-form{
	
}
.jzer-form-flex-transfer{
	&,&>div,.jzer-item-transfer,.ant-form-item-control-input,.ant-form-item-control-input-content,.ant-form-item-row,.ant-transfer{ height:100%;}
	.ant-transfer{align-items:start}
	&>div{flex-direction:column; flex-wrap:nowrap}
}
/* -------------------------------- Table -------------------------------- */
@sw: 8px;
@tableBorderColor:#f5f5f5;
.jzer-table{border-right:1px solid @tableBorderColor;
	th{font-weight:bold!important;color:#333!important;}
	td,th{font-size: @tableFontSize;}
	th:last-child, td:last-child{border-right:none!important;}
	.ant-table-thead{
		th{white-space: nowrap;}
		th[scope='colgroup']{ color: @mainColor !important; }
	}
	.ant-table-container:extend(.fv){}
	.ant-table-body:extend(.ex){.scrollbar(@sw,@scrollColor);}
	// .ant-table-header th.ant-table-cell-fix-right-first{right:@sw!important;}
	// .ant-table-content th.ant-table-cell-fix-right-first{right:0!important;}
	.ant-empty{display: none;}
	.ant-spin-nested-loading, .ant-spin-container, .ant-table,.ant-table-container{ height:100%!important;}
	.ant-select-selector,.ant-input-affix-wrapper{border-radius:3px!important;}
	.ant-table{
		scrollbar-color:auto!important;
	}
	.ant-table-summary{
		td{padding: 5px!important;}
	}
	.ant-picker{width:100%}
	// .ant-table-container{border:none!important;}
}
.jzer-table-simple{
	.ant-table-container{min-height: 120px;}
}
.jzer-table-no-simple{
	.ant-table-container{min-height: 180px;}
}
.jzer-empty{
	.ant-empty{display: block!important;}
}
.jzer-table-scroll{
	.ant-table-wrapper:extend(.abs_full){}
}
.ant-table-placeholder{min-height: 150px;
	td{border: 0!important;}
}
.ant-table-expanded-row-fixed{
	&:after{border:none!important;}
}
.table-size(@name,@size){
	.jzer-table-@{name}{
		th,.ant-table-row td{padding:5px!important;}
		th{}
		td,th{height:@size;}
	}
}
.table-size(middle, 36px);
.table-size(small, 32px);

.ant-table-virtual{overflow:hidden;
	.ant-table-header{
		.ant-table-selection{padding: 0 5px!important;}
	}
	.ant-table-tbody-virtual-holder-inner{z-index:0;
		.ant-table-cell{padding: 4px !important;line-height:30px;font-size: @tableFontSize;}
	}
	.ant-table-header{border-bottom:1px solid #f0f0f0;}
	.rc-virtual-list-scrollbar-vertical{width: 10px!important;}
	.rc-virtual-list-scrollbar-horizontal{height:10px !important;}
	.rc-virtual-list-scrollbar{visibility:visible !important;}
}

// .ant-table-content table{table-layout: fixed!important;}  // 显示横向表格滚动条
//
.danger td:not(.ant-table-cell-fix-right){background-color: red!important; color:#fff}
.ant-input-affix-wrapper-readonly{
	&,[type='text']{background-color:#f9f9f9!important;}
}
.jzer-table-cp{
	.ant-table-body,.ant-table-tbody{
		.ant-table-cell{cursor:pointer}
	}
}
.jzer-table-group{
	.ant-empty{position: relative; top:15px}
	.jzer-table-no-simple{
		.ant-table-container{min-height:238px;}
	}
	.jzer-table-simple{
		.ant-table-container{min-height:180px;}
	}
	.jzer-table-simple + .jzer-empty .ant-empty{top:20px}
	.ant-table-virtual{
		.ant-table-header{min-height:72px;}
	}
}
/* -------------------------------- Modal -------------------------------- */
@hsize:56px;
.jzer-modal-wrap:extend(.fxmc,.modalScrollBar all){
	.ant-modal{max-height: 99%; margin:0!important;top:0!important;padding:0!important;}
	.ant-modal-content:extend(.fv,.ex){height:100%;padding:0px 18px 15px!important;}
	.ant-modal-body:extend(.fv,.ex){padding:1px!important;}
	.ant-modal-header{margin-bottom:0!important;
		.ant-modal-title{height:@hsize;line-height: @hsize;white-space: nowrap;}
	}
	.ant-modal-close{
		.ant-modal-close-x:extend(.fxmc){}
	}
	.ant-modal-footer{
		.ant-btn{margin:0!important}
	}
	.ant-modal-footer{margin-top:10px!important;}
	div[tabindex='0']:first-child{height:100%}
}
.jzer-modal-max-width{
	>.ant-modal{ max-width:1500px; }
}
.jzer-modal-scroll{
	.ant-modal-body{display:block;}
	.ant-modal-body:extend(.modalScrollBar all){position:relative;overflow:auto;}
}
.jzer-modal-full{overflow:hidden!important;
	.ant-modal{max-width: 100%; max-height: 100%;}
	.ant-modal-content{border-radius:0;}
}
.jzer-modal-scroll-hidden{
	.ant-modal-body{overflow:hidden;}
	.ant-modal-close{opacity: 0.3;pointer-events:none;}
}
//无框模式
.jzer-modal-mode-1{
	.ant-modal-header,.ant-modal-footer{border:none}
	.ant-modal-footer{padding: 0 5px 15px 0!important;}
}
/* -------------------------------- ant-transfer -------------------------------- */
.ant-transfer:extend(.fxm){
	.ant-transfer-list:extend(.ex){}
}
/* -------------------------------- Image -------------------------------- */
.ant-image{max-width:100%}
.ant-image-preview-img-wrapper:extend(.fxmc all){}
/* -------------------------------- dataPicker -------------------------------- */
.ant-picker-time-panel-cell-disabled{display:none}
/* -------------------------------- Tabs -------------------------------- */
.jzer-tabs{
	.ant-tabs-tab{padding:0 8px!important;height:36px;background-color: #fff!important;}
	.ant-tabs-content{height:100%}
	.ant-tabs-tab-active{font-weight: bold;}
	.ant-tabs-tabpane{height: 100%;}
}
.jzer-tabs-menu{
	@height:40px;
	height:@height;margin-bottom:8px;
	.ant-tabs-tab:extend(.fxmj){min-width:90px;padding:0 12px!important;border-radius: 8px 8px 0 0!important;border:none!important;
		height:@height;line-height: @height;
	}
	.ant-tabs-tab-btn:extend(.ex){}
	.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{height:auto!important;border-bottom: none;}
	// .ant-tabs-nav-container-scrolling{padding: 0 25px;}
	// .ant-tabs-tab-prev{left:-3px}
	// .ant-tabs-tab-next{right:3px}
	.ant-tabs-nav::before{display:none!important;}
	&.jzer-tabs-menu-one{
		.ant-tabs-tab-remove{display:none;}
	}
}
/* -------------------------------- Upload -------------------------------- */
.ant-upload-select>.ant-upload{overflow: hidden;}
/* -------------------------------- Message -------------------------------- */
.ant-message-notice-content{
	.ant-message-custom-content{pointer-events:none}
}
/* -------------------------------- ant-checkbox-wrapper -------------------------------- */
.ant-checkbox-group{display:flex!important; flex-wrap: wrap; gap:5px;
	.ant-checkbox-wrapper{margin:0!important;}
}

/* -------------------------------- 虚拟滚动 -------------------------------- */
.virtuallist .ant-table-selection-column>div{width:16px!important;margin:0 auto;}
/* -------------------------------- 表格拖宽 -------------------------------- */
/* react-resizable  */
.react-resizable{position: relative; background-clip: padding-box; user-select:none}

.react-resizable-handle {
  position: absolute;
  width: 5px;
  height: 100%;
  bottom: 0;
  right: -1px;
  cursor: col-resize;
  z-index: 1;
}
/* table 列伸缩 */
.ellipsisText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.table-resizable .react-resizable {
    position: relative ;
    background-clip: padding-box;
}
.table-resizable .react-resizable-handle {
    position: absolute;
    width: 10px;
    height: 100%;
    bottom: 0;
    right: -9px;
    cursor: col-resize;
    z-index: 1;
    border-left: white 1px solid;
}